package com.glsc.ngateway.common.base.repo.mysql.opmanagemain.settlement;

import com.glsc.ngateway.common.base.domain.mysql.opmanagemain.settlement.SettlementLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;


@Repository
public interface SettlementLogRepository extends JpaRepository<SettlementLog, Integer>, JpaSpecificationExecutor<SettlementLog> {


    @Query(value = "select count( 1 ) from create_name d where  " +
            "d.create_name = :createName  " +
            "and d.create_time >= :startTime  " +
            "and d.create_time <= :endTime  ", nativeQuery = true)
    Integer findDataCount(@Param("createName") String createName, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);


}
